<script type="text/javascript">
    $(function(){
        $("a#chooseCronExpression").click(function(event){
            var $this = $(this);
            var title = $this.attr("title") || $this.text();
            var rel = $this.attr("rel") || "_blank";
            var cronExpression = $("input[name='cronExpression']").val();
            if(!cronExpression)
                cronExpression = "";
            $.pdialog.open(hostUrl+"/timejob/chooseExpression?cronExpression="+cronExpression, rel, title, {width: 800, height: 560, mask: true});
            return false;
        })
    })

</script>
<div class="pageContent">
    <form method="post" action="${rc.getContextPath()}/manage/timejob/saveOrUpdateJob" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
        <div class="pageFormContent" layoutH="56">
        <input type="hidden" name="navTabId" value="${navTabId!''}">
        <!--jobCodeId用来区分 修改还是新增-->
        <input type="hidden" name="jobCodeId" value="${(timeJob.jobCode!'')?if_exists}">
        <fieldset>
        <dl>
            <dt><@label key='timejob_code.C,colon'>作业编号：</@label></dt>
            <dd><input name="jobCode"   <#if (timeJob.jobCode)??>value="${timeJob.jobCode!''}" readonly="readonly"</#if> size="32"  type="text" maxlength="32"  class="required alphanumeric toUp"/></dd>
        </dl>
        <dl>
            <dt><@label key='timejob_desc.C,colon'>作业描述：</@label></dt>
            <dd><input name="jobDesc"  <#if (timeJob.jobDesc)??> value="${timeJob.jobDesc!''}" </#if> size="32"  type="text" maxlength="32" /></dd>
        </dl>
        <dl>
            <dt><@label key='timejob_class.C,colon'>作业类名：</@label></dt>
            <dd><input name="jobClass"  <#if (timeJob.jobClass)??>value="${timeJob.jobClass!''}" readonly="readonly"</#if> size="32"  type="text" maxlength="64"  class="required"/></dd>
        </dl>
        <dl>
            <dt><@label key='timejob_cronDesc.C,colon'>周期描述：</@label></dt>
            <dd><input name="cronDesc"  value="<#if (timeJob.cronDesc)??>${timeJob.cronDesc!''}</#if>" size="32"  type="text" /></dd>
        </dl>
        <dl>
            <dt><@label key='timeZoneCode.C,colon'>时区：</@label></dt>
            <dd><select name="javaTimeZone" class="required" id="javaTimeZone"> 
                <#list javaTimeZone as tzs>
                <option value="${tzs.timeZoneCode!''}"<#if (timeJob.javaTimeZone)?? && (timeJob.javaTimeZone == tzs.timeZoneCode)> selected</#if>>${tzs.timeZoneName!''}</option> 
                </#list></select>
            </dd>
        </dl>
        <dl>
            <dt><@label key='timejob_cronExpression.C,colon'>周期表达式：</@label></dt>
            <dd><input class="look" name="cronExpression"  value="<#if (timeJob.cronExpression)??>${timeJob.cronExpression!''}</#if>" size="30"  type="text"/>
            <a class="btnLook" id="chooseCronExpression" title="<@label key='timejob_cronExpression.C,colon'>周期表达式：</@label>" rel="chooseExpression"></a>    
            </dd>
        </dl>
        <dl>
            <dt><@label key='timejob_enableFlag.C,colon'>状态：</@label></dt>
            <dd><select name="enableFlag" class="required" id="enable">                
                    <option value="1" <#if (timeJob.enableFlag)?? && (timeJob.enableFlag == 1)> selected</#if>><@label key='enable.C'>启用</@label></option>
                    <option value="0" <#if (timeJob.enableFlag)?? && (timeJob.enableFlag == 0)> selected</#if>><@label key='disable.C'>禁用</@label></option>
            </select></dd>
        </dl>
        <dl>
            <dt><@label key='concurrent.C'>是否并发：</@label></dt>
            <dd><select name="concurrent" class="required" id="enable">                
                    <option value="1" <#if (timeJob.concurrent)?? && (timeJob.concurrent == 1)> selected</#if>><@label key='yes.C'>是</@label></option>
                    <option value="0" <#if (timeJob.concurrent)?? && (timeJob.concurrent == 0)> selected</#if>><@label key='no.C'>否</@label></option>
                </select>
            </dd>
        </dl>
        </fieldset>
        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit"><@label key="save.B">保存</@label></button></div></div></li>
                <li>
                    <div class="buttonActiveGrey"><div class="buttonContent"><button type="button" class="close"><@label key="cancel.B">取消</@label></button></div></div>
                </li>
            </ul>
        </div>
    </form>
</div>
